package com.windea.study.springcloud.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.text.MessageFormat;

@RestController
public class HelloController {
	@Value("${server.port}")
	private String port;

	@GetMapping("/hello")
	public String hello(@RequestParam String name) {
		return MessageFormat.format("hello {0} from port {1}.", name, port);
	}
}
